//
//  InvestTableViewCell.m
//  ZZLC
//
//  Created by 杨春至 on 2017/12/15.
//  Copyright © 2017年 ZhongZeng. All rights reserved.
//

#import "InvestTableViewCell.h"

@interface InvestTableViewCell ()<UITextFieldDelegate>
@property (weak, nonatomic) IBOutlet UILabel *titleLb;

@end

@implementation InvestTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    _desLb.delegate = self;
    self.selectionStyle = UITableViewCellSelectionStyleNone;
}
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{
    NSString *lastStr = [textField.text stringByReplacingCharactersInRange:range withString:string];
//    textField.text = lastStr;
    if (_block) {
        _block(lastStr);
    }
    return YES;
}
- (void)setTitleStr:(NSString *)title canEditStr:(BOOL)editFlag editText:(NSString *)editText placeHodel:(NSString *)placeHolder{
    _titleLb.text = title;
    _desLb.userInteractionEnabled = editFlag;
    _desLb.placeholder = placeHolder;
    _desLb.text = editText;
}
- (void)hideRightUnitLb{
    _unitLb.hidden = YES;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
